<template>
	<TSelector
		:data="data"
		placeholder="请选择框架"
		@setItemValue="setItemValue"
	/>
</template>

<script>
	export default{
		name: 'Selector',
		setup() {
			const data = [
        {
          id: 1,
          value: 'vue',
          text: 'vue.js'
        },
        {
          id: 2,
          value: 'react',
          text: 'react.js'
        },
				{
				  id: 3,
				  value: 'reactNative',
				  text: 'reactNative'
				},
        {
          id: 4,
          value: 'angular',
          text: 'angular.js'
        },
				{
				  id: 5,
				  value: 'node',
				  text: 'node.js'
				},
				{
				  id: 6,
				  value: 'elementui',
				  text: 'element-ui'
				}
      ]
			
			const setItemValue = (value)=> {
				console.log(value)
			}
			
			return {
				data,
				setItemValue
			}
		}
	}
</script>

<style>
</style>
